{extend name="$_tpl_public_layout_danceadmin"/}


{block name="breadcrumb"}
<ol class="breadcrumb">
	<li class="breadcrumb-item"><a href="{:url('admin/index/index')}">{:config('system.site_title')}</a></li>
	<li class="breadcrumb-item"><a href="{:url('admin/weixinAccount/index')}">{$weixinAccountInfo['wxname']}</a></li>
	<li class="breadcrumb-item"><a href="{:url('weixin_manage/menu/index', ['wid'=>$wid])}">{$sideName}</a></li>
</ol>
{/block}


{block name="pageheader"}
{$sideName}
{/block}


{block name="content"}
{include file="index:nav" /}

<div class="card">
	<div class="card-body">
		<form method="post" action="{:url('weixin_manage/menu/doAdd', array('wid'=>$wid))}" class="form-horizontal J_ajaxForm">
			<input type="hidden" name="id" value="{$id}" />
			<div class="form-group row">
				<label class="col-sm-2 control-label">名称</label>
				<div class="col-sm-5">
					<input type="text" name="data[name]" value="{$info['name']}" class="form-control" />
				</div>
				<div class="col-sm-5 help-block">支持Emoji表情符号</div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">选择上级</label>
				<div class="col-sm-5">
					<select name="data[parentid]" class="form-control">
						<?php
						$selected = $parentid == 0 ? 'selected' : '';
						?>
						<option value="0" {$selected}>一级菜单</option>
						{volist name="categorys" id="vo"}
						<?php
						$selected = $info['parentid'] == $vo['id'] ? 'selected' : '';
						?>
						<option value="{$vo.id}" {$selected}>{$vo.name}</option>
						{/volist}
					</select>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">按钮事件</label>
				<div class="col-sm-5">
					<select name="data[event]" class="form-control">
						<?php
						$selected = $parentid == 0 ? 'selected' : '';
						?>
						<option value="" {$selected}>请选择</option>
						{volist name="buttonType" id="vo"}
						<?php
						$selected = $info['event'] == $key ? 'selected' : '';
						?>
						<option value="{$key}" {$selected}>{$vo}</option>
						{/volist}
					</select>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">关键字</label>
				<div class="col-sm-5">
					<input type="text" name="data[keyword]" value="{$info['keyword']}" class="form-control">
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">appid</label>
				<div class="col-sm-5">
					<input type="text" name="data[appid]" value="{$info['appid']}" class="form-control">
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">小程序路径</label>
				<div class="col-sm-5">
					<input type="text" name="data[pagepath]" value="{$info['pagepath']}" class="form-control">
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="form-group row">
				<label class="col-sm-2 control-label">显示</label>
				<div class="col-sm-5">
					<?php echo isOpenRadioHtmlB('data[isopen]', $info['isopen']); ?>
				</div>
				<div class="col-sm-5"></div>
			</div>
			<div class="clearfix form-actions">
				<div class="offset-md-2 col-sm-10">
					<button type="submit" class="btn btn-primary btn-sm J_ajaxSubmit">保存修改</button>
				</div>
			</div>
		</form>
	</div>
</div>
{/block}